package learn.java.liuyayioschina;
public class Fish extends Animal implements Pet
{
	private String name;
	public void walk()
	{
	System.out.println("fish has no legs and can't walk");
	}
	public void play()
	{
		System.out.println("fish is playing in the water");
	}
  public void setName(String name)
  {
  	this.name=name;
  }
  public String getName()
  {
  	System.out.println(name);
  	return name;
  }
  public Fish()
  {
  	super(0);
  }
  public void eat()
  {
  	System.out.println("the fish is eating");
  }
  
}